<html>
<head>
<link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
<?php
include "../header.php";

//Connect to the Db as updater
include_once "devcon.php";
     
$sql = "SELECT * FROM prices ORDER BY id";
     
$result = mysql_query($sql) or die($sql."<br/><br/>".mysql_error());
     
$i = 0;
?>
<div align="center">
<h2>Mineral and Ice Products<br />
Price Update Utility</h2>
<?
echo '<div align="center">';     
echo '<table width="400" border="1" cellpadding="0" cellspacing="0">';
echo '<tr>';
echo '<th align="center" width="75">ID #</td>';
echo '<th align="center" width="200">Item Name</td>';
echo '<th align="center" width="125">Price</td>';
echo '</tr>';
echo "<form method='POST' action='update.php'>\n";
    while ($prices = mysql_fetch_array($result)) {
echo '<tr>';
echo "<td align='center' width='75'>{$prices['id']}<input type='hidden' name='id[$i]' value='{$prices['id']}' /></td>";
echo "<td width='200'>{$prices['mineral']}</td>";
echo "<td width='125'><input type='text' size='15' name='price[$i]' value='{$prices['price']}' class='syntaxcomment' maxlength='25'/></td>";
echo '</tr>';
    ++$i;
    }
echo '<tr>';
echo "<td align='center' colspan='3'><input type='submit' value='Update' /></td>";
echo '</tr>';
echo "</form>";
echo '</table>';
echo '</div>';
mysql_close($link);
?>
<div align="center" class="forumrules">
<h1>YOU MUST UPDATE ALL PRICES OR INSERT DECIMALS BEFORE SUBMITTING.<br>
CODING IS STILL IN DEVELOPMENT.</h1>
<p>&nbsp;</p>
<p><h2><a href="index.php">Return to the Director's Main Page</a></h2></p>
<?
include "../footer.php";
?>
</body>
</html>